package cn.wolfcode.luowowo.article.mapper;

import cn.wolfcode.luowowo.article.domain.StrategyCommend;
import cn.wolfcode.luowowo.article.domain.StrategyDetail;
import cn.wolfcode.luowowo.article.domain.StrategyTag;
import cn.wolfcode.luowowo.common.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);


    List<StrategyDetail> selectForList(QueryObject qo);

    void deleteRelation(Long id);

    void insertRelation(@Param("detailId") Long detailId,@Param("tagId") Long tagId);

    String selectTag(Long detailId);

    List<StrategyDetail>selectByCatalogId(Long catalogId);

    List<StrategyDetail>selectByDestId(Long destId);

    List<StrategyDetail> listVeiwnumTop3(Long destId);

    List<StrategyDetail> listAll();


    void updateState(StrategyDetail detail);

    StrategyDetail selectByThemeIdOne(Long themeId);

    List<StrategyDetail> selectByThemeId(Long themeId);

    List<StrategyDetail> selectByDestIds(Long[] refIds);

    List<StrategyDetail> selectByCondition(@Param("themeId") Long themeId, @Param("refIds") Long[] refIds);
}